<extend name="Layout::photo"/>
<block name="content">
    <div class="layout-content">

        <div class="page-title">图片管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>添加信息</span></li>
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>
        <!--content-main start-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    <div id="tsk" class="ui-tips bg-info" style="display:none">
                        <span class="icon glyphicon glyphicon-info-sign"></span> <span
                            id="ts">提示信息提示信息提示信息提示信息提示信息提示信息。</span>
                    </div>

                    <form class="form-horizontal" action="{:U('Photo/doCreate')}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">图片名</label>
                            <div class="col-sm-5">
                                <input type="text"  name="name" class="form-control "/>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-5">
                                <input type="text"  name="remark" class="form-control"/>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">分类名</label>
                            <div class="col-sm-5">
                                <select class="form-control js-cate" name="photo_cate">
                                    <foreach name="cates" item="cate">
                                        <option data-area="{$cate.id}" value="{$cate.id}">{$cate.name}</option>
                                    </foreach>
                                </select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">图片</label>
                            <div class="col-sm-8">
                                <input type="file" name="pic">
                                <span class="help-block">只能上传 <b>"jpg","png","jpeg"</b> 格式的图片</span>
                            </div>
                        </div>

                        <div class="form-group" >
                            <div class="col-sm-8">
                            <label class="col-sm-2 control-label">链接</label>
                                <input type="text" name="url" value="{$list['url']}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否显示</label>
                            <div class="col-sm-2">
                                是<input type="radio" name="status"  value="10" checked >
                                否<input type="radio" name="status" value="30">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-8">
                                <button style="width: 150px" type="submit"
                                        class="btn btn-default">保存
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!--content-main end-->
    </div>


</block>
